package org.hy.persistence.mypage;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.hy.domain.mypage.MyCareerProblem;
import org.hy.domain.mypage.MyCareerProblemComment;

public interface MyCareerProblemMapper {
	/**
	 * 用于主动分享至小组
	 * @param myCareerProblem
	 * @return
	 */
	int shareToGroup(MyCareerProblem myCareerProblem);
	
	/**
	 * 不带answer,用于分享问题
	 * @param id
	 * @return
	 */
	MyCareerProblem findMyCareerProblemById(Integer id);
	
	
	MyCareerProblem findMyCareerProblemWithCommentsById(@Param("id") int id,@Param("offset")int offset,@Param("limit")int limit);
	
	List<MyCareerProblem> findMyCareerProblemsWithCommentsByUid(Integer uid);
	
	MyCareerProblem findMyCareerProblemWithDefaultCommentsById(@Param("id") int id,@Param("offset")int offset,@Param("limit")int limit);
	
	List<MyCareerProblem> findMyCareerProblemsWithDefaultCommentsByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("limit")int limit);
	
	int updateMyCareerProblem(MyCareerProblem myCareerProblem);
	
	int insertMyCareerProblem(MyCareerProblem myCareerProblem);
	
	int deleteMyCareerProblem(Integer id);
	
	int updateMyCareerProblemComments(MyCareerProblemComment myCareerProblemComment);
	
    int insertMyCareerProblemComments(MyCareerProblemComment myCareerProblemComment);
	
	int deleteMyCareerProblemComments(Integer id);
	
	int countMyCareerProblem(Integer uid);
	
	int countMyCareerProblemComment(int refFeedId);
}
